home *** CD-ROM | disk | FTP | other *** search
- (*
- This small program demonstrates the ability of the BADPTR unit to capture
- the use of bad pointers. To try it, first patch your copy of TPC.EXE by
- running HPAT55. Then compile this program with the patched copy of TPC.
- Finally run it and BADPTR will catch the attempt to make an assignment to
- the region of memory pointed to by the nil pointer P.
-
- See HEAP.DOC for more information.
- *)
-
- {$P+,D+,L+}
- program Demo;
- uses
- badptr;
- var
- p:^integer;
- begin
- p:=nil;
- p^:=1;
- end.